SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO


CREATE PROCEDURE dbo.[DnnProduct_GetTabsByModuleID]
	@ModuleID int
AS
BEGIN

SELECT * FROM dbo.DnnProduct_vw_Tabs VT
	INNER JOIN dbo.DnnProduct_TabModules TM 
		ON VT.TabID=TM.TabID 
WHERE TM.ModuleID = @ModuleID
	AND TM.IsDeleted = 0
	AND VT.IsDeleted = 0
ORDER BY VT.Level, VT.ParentID, VT.TabOrder

END
GO
